<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		<link rel="stylesheet" type="text/css" href="plugins/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="build/css/modules/minu.css" />
		<link rel="stylesheet" type="text/css" href="build/css/app.css" />

		<script src="plugins/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div class="minu-layout">

			<div class="minu-login">

				<form class="layui-form">
					<div class="layui-form-item">
						<div class="minu-login-header">
							<h2>登录</h2>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="minu-col-md">
							<input type="text" name="title" required lay-verify="required" placeholder="用户名" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<div class="minu-col-md">
							<input type="password" name="password" required lay-verify="required" placeholder="密码" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<div class="minu-col10-md6">
							<input type="text" name="code" required lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
						</div>
						<div class="minu-col10-md4">
							<input type="text" name="code" required lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item">
						<div class="minu-col-md">
							<button class="layui-btn minu-btn-full" lay-submit lay-filter="formDemo">登录</button>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="minu-col-md">
							<a href="">忘记密码？</a>
							<a href="">立即注册</a>
						</div>
					</div>
				</form>

			</div>

		</div>

		<script type="text/javascript">
			layui.config({
				base: 'build/js/modules/'
			}).use(['app', 'form'], function() {
				var $ = layui.jquery,
					app = layui.app,
					minu = layui.minu,
					form = layui.form;

				var f = {
					load: function(t) {
						app.login('.minu-login');
					}
				}

				f.load();

				window.onresize = function() {
					f.load();
				}

				//监听提交
				form.on('submit(formDemo)', function(data) {
					layer.msg(JSON.stringify(data.field));
					return false;
				});
			});
		</script>
	</body>

</html>